package com.lemon.system.controller;

import com.lemon.core.web.Result;
import com.lemon.system.service.ITenantService;
import com.lemon.system.service.IUserService;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 李猛
 * @datetime 2024/2/15 3:33
 * @description 注册控制器
 */
@Log4j2
@RestController
@RequestMapping("register")
public class RegisterController {
    @Resource
    private IUserService iUserService;
    @Resource
    private ITenantService iTenantService;
    /**
     * 用户注册
     *
     * @return
     */
    @PostMapping("userRegister")
    public Result<String> userRegister() {
        return iUserService.register();
    }

    /**
     * 租户注册
     *
     * @return
     */
    @PostMapping("tenantRegister")
    public Result<String> tenantRegister() {
        return iTenantService.register();
    }
}
